$(function(){
    $('.close1').click(function(){
        var $product = $(this).parents('.cart-header');
        var phoneid = $product.attr('data-phoneid');
        alert(phoneid);
        var ordernumber = $product.attr('');
            $.ajax({
            url: '/phone/index.php/Home/Checkout/delete',
            type: 'POST',
            dataType: 'json',
            data: {phoneid: phoneid},
            success: function(data){
                if(data.code == 0){
                      alert("删除成功,请刷新页面F5");
                      $product.remove();
                }
                //console.log(data);
            },
            error: function(xhr){
                alert("删除失败，请重试！");
                console.log(xhr);
            }
        });

    });
    
});